Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyGazebo can now wait until Gazebo starts #25

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Skylion007
Copy link

Added a feature to allow PyGazebo to wait until Gazebo starts up. This is useful if you want to say launch Gazebo and then wait for the network service to become available before proceeding with your PyGazebo code.

Added a feature to allow PyGazebo to wait until Gazebo starts up. This is useful if you want to say launch Gazebo and then wait for the network service to become available before proceeding with your PyGazebo code.
@virtuald
Copy link
Contributor

This code will block an event loop, seems like this should be implemented with trollius and set a future instead.

@Skylion007
Copy link
Author

I am little confused on how to do that. Do I just return a future true or false and put this in a coroutine?

@virtuald
Copy link
Contributor

Almost. You would return a future object, yes. And then you would do some socket operations using the async API (not using socket directly), and when the connection finally succeeds then you would set the future value to something.

@jpieper
Copy link
Owner

jpieper commented Aug 1, 2015

virtuald is correct, you'd want to use trollius/asyncio primitives to accomplish waiting. Here that would mean returning a future object which was invoked when the connection was made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants